package com.zhaoyue.study.util;

import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.map.LRUMap;
import org.apache.commons.collections4.map.MultiKeyMap;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.List;

/**
 * @author zhaoyue
 * @description:
 * @create 2018-11-15 下午2:34
 **/
public class StringUtilDemo implements Serializable {

    public static void main(String[] args) {
        String a = "aa", b = "bb", c = null, d = "你好";
        System.out.println(StringUtils.isBlank(a));
        System.out.println(StringUtils.isNotBlank(b));
        System.out.println(StringUtils.isAllBlank(a, b, c));
        System.out.println(StringUtils.isAnyBlank(a, c, b));
        System.out.println(StringUtils.isNumeric(a));
        System.out.println(StringUtils.isAlpha(d));
        System.out.println("" + StringUtils.isAlpha("?aaa"));

        LRUMap<String, String> lruMap = new LRUMap<String, String>(1000);


        lruMap.put("a", b);

        MultiKeyMap multiKeyMap = new MultiKeyMap();
        multiKeyMap.put(1, 2, 3, 11);
        multiKeyMap.put(12, 3453245, "aa");

        List<String> list1 = Lists.newArrayList("a","b","c");
        List<String> list2 = Lists.newArrayList("d","e","f");
        CollectionUtils.union(list1,list2);



//        LongObjectHashMap longObjectHashMap = new LongObjectHashMap();
//        longObjectHashMap.put(1,2);
//        longObjectHashMap.put(2,3);



    }
}
